<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class CreateFeedbackTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feedback', function (Blueprint $table) {
            $table->increments('sug_id');
            $table->integer('uid')  ->comment('反馈用户uid')  ->default(0);
            $table->text('content') ->comment('反馈内容')    ->default('');
            $table->string('phone') ->comment('手机号')    ->default('');
            $table->timestamp('created_at') ->comment('提交时间')->default(DB::raw('CURRENT_TIMESTAMP'));
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('feedback');
    }
}
